//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by 徐昊 on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)setH_x:(CGFloat)h_x {
    CGRect rect = self.frame;
    rect.origin.x = h_x;
    self.frame = rect;
}
- (CGFloat)h_x {
    return self.frame.origin.x;
}
- (void)setH_y:(CGFloat)h_y {
    CGRect rect = self.frame;
    rect.origin.y = h_y;
    self.frame = rect;
}

- (CGFloat)h_y {
    return self.frame.origin.y;
}

- (void)setH_width:(CGFloat)h_width {
    CGRect rect = self.frame;
    rect.size.width = h_width;
    self.frame = rect;
}

- (CGFloat)h_width {
    return self.frame.size.width;
}

- (void)setH_height:(CGFloat)h_height {
    CGRect rect = self.frame;
    rect.size.height = h_height;
    self.frame = rect;
}

- (CGFloat)h_height {
    return self.frame.size.height;
}

@end
